public class Test {
    public static int max2(int x,int y){
        return x>y?x:y;
    }
    public static int max3(int x,int y,int z){
        return max2(max2(x,y),max2(y,z));
    }
    public static void main(String[] args){
        int x=10;
        int y=20;
        int z=30;
        int ret=max3(x,y,z);
        System.out.println(ret);
    }
}
